
import java.util.Scanner;

class JSEDEX {

    public static void main(String[] args) {
        Scanner entrada = new Scanner(System.in);

        int N = entrada.nextInt();
        int A = entrada.nextInt();
        int L = entrada.nextInt();
        int P = entrada.nextInt();

        System.out.println((N <= A && N <= L && N <= P) ? "S" : "N");
    }

}
